package convertdate01;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class ConvertDateDemo04 {
    public static void main(String[] args) {

        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse("2013/12/13 12:10:11", df);
        System.out.println(parse.getYear()); // 2013
        System.out.println(parse.getHour());  // 12

    }
}
